<?php

class BaseController extends CController{
		
	public function __construct() {
		parent::__construct();
	}
	
	public function _initialize() {
		if(!isset($_SESSION['admin'])) {//如果未登录，直接定向到登录
			$this->redirect(U('login','index'));
		}
	}

}